/*
 * UIComponent.h
 */

#ifndef UICOMPONENT_H_
#define UICOMPONENT_H_

#include "RGBAColor.hpp"

/**
 * Interface representing an UI Component of the UIEngine
 * It is the base class for the composite pattern
 */
class UIComponent {
public:
  /**
   * Draws the UI Component in the current OpenGL context
   */
  virtual void draw() = 0;

  /**
   * Sets the depth for the UI Component
   * @param depth depth value to apply
   */
  void setDepth(float depth) {
    _depth = depth;
  }

protected:
  /**
   * x-coordinate of the UI Component
   */
  float _xpos;

  /**
   * y-coordinate of the UI Component
   */
  float _ypos;

  /**
   * Width of the UI Component
   */
  float _width;

  /**
   * Height of the UI Component
   */
  float _height;

  /**
   * Depth of the UI Component
   */
  float _depth;
};

#endif /* UICOMPONENT_H_ */
